/*
 * File: SOC_AH.h
 *
 * Code generated for Simulink model 'SOC_AH'.
 *
 * Model version                  : 1.18
 * Simulink Coder version         : 8.11 (R2016b) 25-Aug-2016
 * C/C++ source code generated on : Thu Sep 10 14:31:28 2020
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: STMicroelectronics->ST10/Super10
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#ifndef RTW_HEADER_SOC_AH_h_
#define RTW_HEADER_SOC_AH_h_
#include <math.h>
#include <string.h>
#ifndef SOC_AH_COMMON_INCLUDES_
# define SOC_AH_COMMON_INCLUDES_
#include "rtwtypes.h"
#endif                                 /* SOC_AH_COMMON_INCLUDES_ */

#include "SOC_AH_types.h"

/* Macros for accessing real-time model data structure */
#ifndef rtmGetErrorStatus
# define rtmGetErrorStatus(rtm)        ((rtm)->errorStatus)
#endif

#ifndef rtmSetErrorStatus
# define rtmSetErrorStatus(rtm, val)   ((rtm)->errorStatus = (val))
#endif

/* Block states (auto storage) for system '<Root>' */
typedef struct {
  real_T DiscreteTimeIntegrator_DSTATE;/* '<S1>/Discrete-Time Integrator' */
  uint8_T DiscreteTimeIntegrator_IC_LOADI;/* '<S1>/Discrete-Time Integrator' */
} DW_SOC_AH_T;

/* Constant parameters (auto storage) */
typedef struct {
  /* Expression: [7.38,7.349,7.287,7.273,7.245,7.258,7.284,7.295,7.317]
   * Referenced by: '<S1>/BMS_DchaRate'
   */
  real_T BMS_DchaRate_tableData[9];

  /* Expression: [7.5,10,15,17.5,22.5,25,30,32.5,37.5]
   * Referenced by: '<S1>/BMS_DchaRate'
   */
  real_T BMS_DchaRate_bp01Data[9];

  /* Computed Parameter: BMS_Capacity_tableData
   * Referenced by: '<S1>/BMS_Capacity'
   */
  real_T BMS_Capacity_tableData[65];

  /* Computed Parameter: BMS_Capacity_bp01Data
   * Referenced by: '<S1>/BMS_Capacity'
   */
  real_T BMS_Capacity_bp01Data[5];

  /* Computed Parameter: BMS_Capacity_bp02Data
   * Referenced by: '<S1>/BMS_Capacity'
   */
  real_T BMS_Capacity_bp02Data[13];

  /* Expression: [0,0.7,6.2,11.7,17.3,22.8,28.3,33.8,39.3,44.8,50.3,55.9,61.4,66.9,72.4,77.9,83.4,89,94.5,100]
   * Referenced by: '<S2>/SOC_Corr_OCV'
   */
  real_T SOC_Corr_OCV_tableData[20];

  /* Expression: [3242,3267,3391,3463,3507,3558,3602,3637,3666,3704,3749,3803,3869,3910,3951,4000,4050,4083,4110,4179]
   * Referenced by: '<S2>/SOC_Corr_OCV'
   */
  real_T SOC_Corr_OCV_bp01Data[20];

  /* Computed Parameter: BMS_Capacity_maxIndex
   * Referenced by: '<S1>/BMS_Capacity'
   */
  uint32_T BMS_Capacity_maxIndex[2];
} ConstP_SOC_AH_T;

/* External outputs (root outports fed by signals with auto storage) */
typedef struct {
  real_T SOC_InitCorr;                 /* '<Root>/SOC_InitCorr' */
} ExtY_SOC_AH_T;

/* Real-time Model Data Structure */
struct tag_RTM_SOC_AH_T {
  const char_T *errorStatus;

  /*
   * Timing:
   * The following substructure contains information regarding
   * the timing information for the model.
   */
  struct {
    struct {
      uint8_T TID[2];
    } TaskCounters;
  } Timing;
};

/* Block states (auto storage) */
extern DW_SOC_AH_T SOC_AH_DW;

/* External outputs (root outports fed by signals with auto storage) */
extern ExtY_SOC_AH_T SOC_AH_Y;

/* Constant parameters (auto storage) */
extern const ConstP_SOC_AH_T SOC_AH_ConstP;

/* Model entry point functions */
extern void SOC_AH_initialize(void);
extern void SOC_AH_step(void);
extern void SOC_AH_terminate(void);

/* Real-time Model object */
extern RT_MODEL_SOC_AH_T *const SOC_AH_M;

/*-
 * These blocks were eliminated from the model due to optimizations:
 *
 * Block '<S1>/Scope' : Unused code path elimination
 * Block '<S1>/Scope1' : Unused code path elimination
 * Block '<S1>/Scope3' : Unused code path elimination
 * Block '<S2>/Scope' : Unused code path elimination
 * Block '<S2>/Scope4' : Unused code path elimination
 * Block '<S2>/Scope5' : Unused code path elimination
 * Block '<Root>/Scope1' : Unused code path elimination
 * Block '<Root>/Scope2' : Unused code path elimination
 */

/*-
 * The generated code includes comments that allow you to trace directly
 * back to the appropriate location in the model.  The basic format
 * is <system>/block_name, where system is the system number (uniquely
 * assigned by Simulink) and block_name is the name of the block.
 *
 * Use the MATLAB hilite_system command to trace the generated code back
 * to the model.  For example,
 *
 * hilite_system('<S3>')    - opens system 3
 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : 'SOC_AH'
 * '<S1>'   : 'SOC_AH/SOC_AH'
 * '<S2>'   : 'SOC_AH/SOC_InitCorrected'
 */
#endif                                 /* RTW_HEADER_SOC_AH_h_ */

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
